package indigo.collections
{
	internal class Enumerator implements IEnumerator
	{
		private var _items:Array;
		private var _position:uint;
		private var _current:Object;
		
		public function get current():Object {
			return _current;
		}
		
		public function Enumerator(items:Array) {
			_items = items;
			reset();
		}
		
		public function moveNext():Boolean {
			_current = _items[_position++];
			if(_current) return true;
			return false;
		}
		
		public function reset():void {
			_position = 0;
		}
	}
}